<?php
if (!defined('TYPO3_MODE')) {
	die('Access denied.');
}

// Extend tt_news table
$tempColumns = array(
	'tx_ncttnewsmostpopular_counter' => array(
		'label' => 'LLL:EXT:nc_ttnews_mostpopular/locallang_db.xml:tx_ncttnewsmostpopular_counter',
		'exclude' => 1,
		'config' => array(
			'type' => 'input',
			'size' => 5,
			'eval' => 'int',
			'default' => 0,
		),
	),
);
t3lib_div::loadTCA('tt_news');
t3lib_extMgm::addTCAcolumns('tt_news', $tempColumns);
$_extConf = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['nc_ttnews_mostpopular']);
if ($_extConf['displayStats']) {
	t3lib_extMgm::addToAllTCAtypes('tt_news', 'tx_ncttnewsmostpopular_counter');
}
unset($tempColumns);

?>